package cn.yunhe.crm.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.yunhe.crm.dao.AftersaleMapper;
import cn.yunhe.crm.entity.Aftersale;

@Service("AftersaleService")
public class AftersaleService {

	@Autowired
	private AftersaleMapper asMapper;
	
	public void setasMapper(AftersaleMapper asMapper) {
		this.asMapper = asMapper;
	}
	/**
	 * 查询所有售后日志信息
	 * @return
	 */
	public List<Aftersale> checkAllAftersale(){
		return asMapper.checkAllAftersale();
	}
	/**
	 * 通过ID查询售后日志信息
	 * @param id
	 * @return
	 */
	public Aftersale checkAftersaleById(Integer id){
		return asMapper.checkAftersaleById(id);
	}
	/**
	 * 编辑售后日志
	 * @param aftersale
	 * @return
	 */
	public int updateAftersale(Aftersale aftersale){
		return asMapper.updateAftersale(aftersale);
	}
	
	/**
	 * 删除售后日志
	 * @param id
	 * @return
	 */
	public int delAftersale(Integer id){
		return asMapper.delAftersale(id);
	}
	
	/**
	 * 增加售后日志
	 * @param aftersale
	 * @return
	 */
	public int addAftersale(Aftersale aftersale){
		return asMapper.addAftersale(aftersale);
	}
	/**
	 * 查询售后日志总数
	 * @return
	 */
	public int  checkCount() {
		return asMapper.checkCount();
	}
	/**
	 * 查询当日售后日志总数
	 * @return
	 */
	public int countByToday(){
		return asMapper.checkCountByToday();
	}
}
